package com.lyf.boot.modules.system.entity.dto;

import com.lyf.boot.base.system.entity.SysDept;
import com.lyf.boot.validate.group.AddGroup;
import com.lyf.boot.validate.group.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author Luyufan
 * @date 2023/7/7 9:04
 */
@Data
@AutoMapper(target = SysDept.class)
public class SysDeptDto implements Serializable {

    @Serial
    private static final long serialVersionUID = -4840166387710890322L;

    /**
     * 部门id
     */
    @NotNull(message = "用户Id不能为空", groups = {EditGroup.class})
    private Long deptId;

    /**
     * 部门名称
     */
    @NotNull(message = "部门名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String deptName;

    /**
     * 父级部门id
     */
    private Long parentId;

    /**
     * 排序号
     */
    private Integer sort;

    /**
     * 状态
     */
    @NotNull(message = "状态不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer status;

    /**
     * 备注
     */
    private String remark;

}
